1. Field of the Invention
The present invention generally relates to a method for testing a function of a sensor, and more particularly, to a method for testing a rearm function of a sensor and a computer program product thereof.
2. Description of Related Art
A server usually plays a very important role in maintaining the operations of a system because of the high stability and performance thereof. Accordingly, it is very important to effectively monitor the status of a server. Sensors are generally disposed in a server for reflecting the healthiness of the server in different aspects (such as temperature, voltage, fan speed, and power supply, etc).
When a sensor detects an unusual variation in the environment, it issues an assertion event, and the sensor itself enters a failure status. However, the sensor has to be rearmed by a firmware regardless of whether the sensor issues a de-assertion event or the sensor itself returns from the failure status back to a normal status when the environmental variation is back to normal. The rearm type of the sensor may be an auto rearm type or a manual rearm type. Because the rearm type of a sensor is defined in a firmware, it is very important to test whether a sensor of the auto rearm type can automatically return to the normal status and whether a sensor of the manual rearm type can return to the normal status after receiving a rearm instruction during the development of a server.
Presently, a server may have hundreds of sensors, and each of the sensors may have many different failure statuses. Thus, the rearm function of a sensor is usually tested regarding several failure statuses of the sensor. However, such a method cannot make sure that the sensor can always return to the normal status from any failure status. However, it costs too much time and human effort to test the sensor regarding each failure status thereof, and some failure statues (for example, the one caused by an internal error of a central processor) are very difficult to be discovered.